package com.testfileupload.uploadimg.design.proxy.dynamic.dc1;

import java.lang.reflect.Proxy;

public class Client {
    public static void main(String[] args) {
        GamePlayer gamePlayer = new GamePlayer("zzz");
        GamePlayIH gamePlayIH = new GamePlayIH(gamePlayer);
        ClassLoader classLoader = gamePlayer.getClass().getClassLoader();

        IGamePlayer o = (IGamePlayer) Proxy.newProxyInstance(classLoader, new Class[]{IGamePlayer.class}, gamePlayIH);
        o.login("3", "3");
        o.killBoss();
        o.upgrade();

    }

}
